# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=gnuplot
pkgver=5.4.0
pkgrel=0
pkgdesc="Utility for plotting graphs"
url="http://www.gnuplot.info/"
arch="all"
license="MIT"
makedepends="cairo-dev pango-dev gd-dev lua5.3-dev readline-dev
	libpng-dev libjpeg-turbo-dev"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/project/gnuplot/gnuplot/$pkgver/gnuplot-$pkgver.tar.gz"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-stats \
		--disable-wxwidgets \
		--disable-qt
	make
}

check() {
	make GNUTERM=dumb check
}

package() {
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 BUGS NEWS PGPKEYS README* \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="abbb69ded9eed3a1e53caeeb7d75ee4e3532b1254640a3f38f00260e261e75f87744e3df4210b0db7c8c2acee9b25147524d5377b3f4305e2449b2e99ca58d66  gnuplot-5.4.0.tar.gz"
